BlockingCollection(T) Constructor (IProducerConsumerCollection(T))

Task Parallel System.Threading

Initializes a new instance of the BlockingCollection<(Of <(T>)>) class without an upper-bound and using the provided IProducerConsumerCollection<(Of <(T>)>) as its underlying data store.

Namespace:  System.Collections.Concurrent
Assembly:  System.Threading (in System.Threading.dll)

Syntax

Visual Basic (Declaration)
Public Sub New ( _
	collection As IProducerConsumerCollection(Of T) _
)
C#
public BlockingCollection(
	IProducerConsumerCollection<T> collection
)

Parameters

collection
Type: System.Collections.Concurrent..::.IProducerConsumerCollection<(Of <(T>)>)
The collection to use as the underlying data store.

Exceptions

ExceptionCondition
System..::.ArgumentNullExceptionThe collection argument is null.

See Also